const MenuCtrl = require("./menu.ctrl");
const checkUserInfo = require("../../middleware/checkUserInfo");
const { checkPermission } = require("../../config/acl");
module.exports = (router) => {
	router.get("/menus", checkUserInfo, checkPermission("list_menu"), checkUserInfo, MenuCtrl.list);
	router.post("/menus", checkUserInfo, checkPermission("create_menu"), checkUserInfo, MenuCtrl.create);
	router.put("/menus", checkUserInfo, checkPermission("create_menu"), checkUserInfo, MenuCtrl.update);
	router.delete("/menus/:id", checkUserInfo, checkPermission("delete_menu"), checkUserInfo, MenuCtrl.del);
};